// LengthOfTuple  计算元组类型的长度

// type LengthOfTuple<T> = T extends [infer L, ...infer R] ? T["length"] : 0
type LengthOfTuple<T extends any[]> = T["length"] // 限制了必须为数组, 上面的没有限制
type A = LengthOfTuple<['B', 'F', 'E']> // 3
type B = LengthOfTuple<[]> // 0
type C = LengthOfTuple<[1,2,3,4,5]> // 5
type D = LengthOfTuple<[true, undefined, null]> // 2
type F = LengthOfTuple<''> // 2   

export {}